import pandas as pd


class Format:
    """
    格式管道 将 DF 处理成理想的 List
    """
    @staticmethod
    def execute(df:pd.DataFrame) -> list:
        # TODO 格式区
        myList = []
        for  data in df.iterrows():
            tmp = data[1].tolist()
            appendEle = [str(i).replace('\\n','\n')  for i in tmp]
            try:
                appendEle = appendEle.remove('nan')
            except:
                pass
            myList.append(appendEle)

        return myList
